<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用精灵图拼名字</title>
    <style>
        /* 取值一般都是负值 切记 */
        span {
            display: inline-block;
            background: url(images/abcd.jpg) no-repeat;
        }

        .p {
            width: 92px;
            height: 111px;
            background-position: -497px -276px;
        }

        .i {
            width: 62px;
            height: 108px;
            background-position: -326px -140px;
        }

        .n {
            width: 113px;
            height: 111px;
            background-position: -255px -275px;
        }

        .k {
            width: 108px;
            height: 110px;
            background-position: -492px -143px;
        }
    </style>
</head>

<body>
    <span class="p">p </span>
    <span class="i">i</span>
    <span class="n">n</span>
    <span class="k">k</span>
</body>

</html>